package com.qumoyugo.springframework.beans.factory.config;

import com.qumoyugo.springframework.beans.BeansException;

/**
 * 用于修改bean实例化修改的扩展点
 */
public interface BeanPostProcessor {

    /**
     * 在初始化执行前执行此方法
     * @param bean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object postProcessorBeforeInitialization(Object bean, String beanName) throws BeansException;

    /**
     * 在初始化执行后执行此方法
     * @param bean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object postProcessorAfterInitialization(Object bean, String beanName) throws BeansException;

}
